/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.erpworld.frag;

import org.primefaces.component.menuitem.MenuItem;
import org.primefaces.component.submenu.Submenu;
import org.primefaces.model.DefaultMenuModel;
import org.primefaces.model.MenuModel;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 * @author volkan
 */
@ManagedBean
@RequestScoped
public class LeftMenu {

    /**
     * Creates a new instance of leftMenu
     */
    private MenuModel model;

    public LeftMenu() {
        model = new DefaultMenuModel();
        Submenu menu = new Submenu();
        menu.setLabel("User");

        MenuItem item = new MenuItem();
        item.setValue("User  Listesi");
        item.setUrl("/faces/hr/userList.xhtml");
        menu.getChildren().add(item);
        model.addSubmenu(menu);
        
        item = new MenuItem();
        menu = new Submenu();
        menu.setLabel("Personel");
         item = new MenuItem();
        item.setValue("Personel  Listesi");
        item.setUrl("/faces/hr/personelList.xhtml");
        menu.getChildren().add(item);
        item = new MenuItem();

        model.addSubmenu(menu);

    }

    public MenuModel getModel() {
        return model;
    }
}
